From: Mark A. Hershberger Date: Thu, 11 Feb 2010 06:14:15 +0000 (+0000) Subject: Make sure Firefogg gets the json it needs. X-Git-Tag: 1.31.0-rc.0~37825 X-Git-Url: http://git.cyclocoop.org/%22.%24info%5B?a=commitdiff_plain;h=fd27d340b537ef3a10ac3552e397c99cf2de9485;p=lhc%2Fweb%2Fwiklou.git Make sure Firefogg gets the json it needs. --- diff --git a/includes/api/ApiUpload.php b/includes/api/ApiUpload.php index e99e5d9686..b426262e53 100644 --- a/includes/api/ApiUpload.php +++ b/includes/api/ApiUpload.php @@ -249,7 +249,7 @@ class ApiUpload extends ApiBase { $this->getResult()->setIndexedTagName( $result['details'], 'error' ); $this->dieUsage( 'An internal error occurred', 'internal-error', 0, $error ); - } elseif( isset($status->value->uploadUrl) ) { + } elseif( $this->mParams['enablechunks'] ) { return $status->value; } diff --git a/includes/upload/UploadFromChunks.php b/includes/upload/UploadFromChunks.php index 8432d1283a..2feccb4969 100644 --- a/includes/upload/UploadFromChunks.php +++ b/includes/upload/UploadFromChunks.php @@ -164,7 +164,7 @@ class UploadFromChunks extends UploadBase { // firefogg expects a specific result // http://www.firefogg.org/dev/chunk_post.html return Status::newGood( - array('result' => 1, 'done' => 1, 'resultUrl' => $file->getDescriptionUrl() ) + array('result' => 1, 'done' => 1, 'resultUrl' => wfExpandUrl( $file->getDescriptionUrl() ) ) ); }